import { Checkbox, CheckboxGroup, Spin, Row, Col } from 'antd';
import { WeaTab, WeaInputSearch, WeaCheckbox, WeaLocaleProvider } from 'ecCom';
const getLabel = WeaLocaleProvider.getLabel;
import classNames from 'classnames';
import { Button } from 'antd';
export default class FilterComponentOptions extends React.Component {


    render() {
        const { sortType } = this.props;
        console.log(sortType)
        return (
            <div className="edc-data-list-filter-selection">
                <div className="sort">
                    {/* <div className={classNames({ active: sortType === 'ascend' })} onClick={this.props.changeAsc}><i className="icon-edc-common-sort-ascending"></i>升序</div>
                    <div className={classNames({ active: sortType === 'descend' })} onClick={this.props.changeDesc}><i className="icon-edc-common-sort-descending"></i>降序</div> */}
                    {this.props.isShowAdSearch && <div className={{}}><WeaCheckbox ecId={`${this && this.props && this.props.ecId || ''}_WeaCheckbox@d08eoh`}
                        style={{ display: 'inline' }}
                        onChange={this.props.changeSearch}
                        value = {this.props.isSearch}
                        display="switch"
                    />{getLabel('502296', '高级搜索')}</div>}
                </div>
                <div className="tabs">
                    <WeaTab ecId={`${this && this.props && this.props.ecId || ''}_WeaTab@m9qhqe`}
                        datas={[{ key: '1', title: getLabel('509260','内容筛选') }]}
                        keyParam="key"
                        selectedKey="1"
                        size="small"
                        mini={true}
                    />
                    <div className="quick-search">
                        <WeaInputSearch ecId={`${this && this.props && this.props.ecId || ''}_WeaInputSearch@obr58t`} placeholder={getLabel('509261','输入内容')} onSearchChange={this.props.quickSearch}
                            onSearch={this.props.quickSearch}
                            value={this.props.quickSearchValue}></WeaInputSearch>
                    </div>
                </div>
                <div className="data-selections">
                    <Spin ecId={`${this && this.props && this.props.ecId || ''}_Spin@p99hit`} spining={this.props.loading}>
                        <Checkbox ecId={`${this && this.props && this.props.ecId || ''}_Checkbox@05qkbg`} value="A"
                            indeterminate={this.props.indeterminate}
                            onChange={this.props.onCheckAllChange}
                            checked={this.props.checkAll} >{getLabel('509262','全选')}</Checkbox>
                        <Checkbox.Group ecId={`${this && this.props && this.props.ecId || ''}_CheckboxGroup@jg2x30`}
                            options={this.props.options}
                            value={this.props.value}
                            onChange={this.props.onChange}
                        />
                    </Spin>
                </div>
                <div class="footer-btns" >
                    <Button ecId={`${this && this.props && this.props.ecId || ''}_Button@ihe57u`}
                        size="small"
                        onClick={this.props.onFilter}
                    >{getLabel('826', '确定')}</Button>
                    <Button ecId={`${this && this.props && this.props.ecId || ''}_Button@1kmkra`}
                        size="small"
                        onClick={this.props.hideFilter}
                    >{getLabel(31129, '取消')}</Button>
                </div>
            </div>
        )

        // <Spin spining={this.props.loading}>

        //         <Checkbox value={1}>11111</Checkbox >
        //         <Checkbox.Group onChange={this.props.onChange}>
        //         <Row>
        //             { this.props.options.map(d => (
        //                 <Col span={8}>
        //                  <Checkbox value={d.key}>{d.showname}</Checkbox >
        //                  </Col>
        //             ))}
        //             </Row>
        //             </Checkbox.Group>
        //         </Spin>
    }
}